package com.zk.cq.config;/**
 * Created by 15911 on 2019/6/30.
 */

import org.springframework.web.client.RestTemplate;

/**
 * @ClassName RobotFactory
 * @Descripyion 工厂类
 * @Author zhangkuan
 * @Date 2019/6/30 13:37
 **/
public class RobotFactory {

    private static RestTemplate restTemplate;

    public static RestTemplate getRestTemplate(){
        if (restTemplate == null){
            synchronized (RobotFactory.class){
                if (restTemplate == null){
                    restTemplate = new RestTemplate();
                }
            }
        }
        return restTemplate;
    }
}
